package com.idopartx.phonelightning.ui.permissionguide

import android.app.Dialog
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.widget.Button
import com.idopartx.phonelightning.R

open class RemoveLimitDialog(context: Context, callback: DialogCallBack?) : Dialog(context) {
    var callback: DialogCallBack? = null

    init {
        this.callback = callback
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val window = window
        window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
        setContentView(R.layout.dialog_remove_limit)
        setCanceledOnTouchOutside(false)

        findViewById<Button>(R.id.btn_start).setOnClickListener {
            dismiss()
            callback?.onOk()
        }
    }

    interface DialogCallBack {
        fun onOk()
    }

}